﻿using SqlSugar;

namespace WebApi.Model
{
    [SugarTable("t_User")]
    public class Users
    {
        /// <summary>
        /// 用户主键Id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; } = -1;
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 用户权限  0：管理员 1：普通用户
        /// </summary>
        public int UserPower { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 工作组
        /// </summary>
        public int WorkGroup { get; set; }
        /// <summary>
        /// 标志
        /// </summary>
        public string Tag { get; set; }
        /// <summary>
        /// 用于表格绑定
        /// </summary>
        [SqlSugar.SugarColumn(IsIgnore = true)]
        public string UserPowerStr => UserPower == 0 ? "管理员" : "用户";
        /// <summary>
        /// 签字图片Base64格式
        /// </summary>
        public string SignPictureBase64 { get; set; }
    }
}